<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="Validation d'un panier"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:dataTable value="#{commandeDuJourController.selected.itemList}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Item Ref"/>
                            </f:facet>
                            <h:outputText value="#{item.itemRef}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Nom Type"/>
                            </f:facet>
                            <h:outputText value="#{item.type.libelle}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Choix exemplaire"/>
                            </f:facet>
                            <h:selectOneMenu id="exemplaires" value="#{item.exemplaireSelected}" title="Exemplaire de l'item">
                                <f:selectItems value="#{item.exemplaireList}"/>
                            </h:selectOneMenu>
                        </h:column>
                    </h:dataTable>
                <h:commandLink action="#{commandeDuJourController.valid}" value="Valider panier"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditCommandeDuJourIndexLink}" action="/index" immediate="true" />
                
            </h:form>
        </ui:define>
    </ui:composition>
</html>
